package com.zhc.dejingapi.controller;


import com.zhc.dejingapi.entity.QingPersonEntity;
import com.zhc.dejingapi.entity.vo.SelectBoxVo;
import com.zhc.dejingapi.service.QingPersonService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zhc
 * @since 2024-08-10
 */
@RestController
@RequestMapping("/qing-person-entity")
@CrossOrigin
public class QingPersonController {

    @Resource
    private QingPersonService qingPersonService;

    @GetMapping("/getQingPerson")
    public List<SelectBoxVo> getQingPersonList(){
        return qingPersonService.getQingPersonList();
    }

    @PostMapping("/selectPerson")
    public List<SelectBoxVo> selectPerson(@RequestBody QingPersonEntity qingPersonEntity){
        return qingPersonService.selectPerson(qingPersonEntity);
    }
}
